package com.itheima.wechat;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.Result;
import com.itheima.pojo.Setmeal;
import com.itheima.service.SetmealService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RequestMapping("/setmeal")
@RestController
public class SetmealController {
    @Reference
    SetmealService setmealService;
    @RequestMapping("/getSetmeal")
    public Result getmeal() {
        List<Setmeal> setmeals=setmealService.getSetmeal();
        return Result.success("",setmeals);
    }
    @RequestMapping("/findById")
    public Result findById(Integer id){
        Setmeal setmeal=setmealService.findByIdBatch(id);
        return Result.success("",setmeal);
    }
}
